Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(ui): update config at runtime to apply branding #1381

Merged

Conversation

ciiay
Copy link
Contributor

@ciiay ciiay commented Jul 9, 2024

Description

Currently app.branding.iconLogo is not being injected during runtime, which leads favicon not updating from customization. This PR added a ConfigUpdater component to take the config at runtime so that customized iconLogo will be picked up as favicon.

Which issue(s) does this PR fix

PR acceptance criteria

Please make sure that the following steps are complete:

  • GitHub Actions are completed and successful
  • Unit Tests are updated and passing
  • E2E Tests are updated and passing
  • Documentation is updated if necessary (requirement for new features)
  • Add a screenshot if the change is UX/UI related

How to test changes / Special notes to the reviewer

Test data:

data: 
  app-config-rhdh.yaml: |
    app: 
      branding: 
        iconLogo: data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAADAFBMVEVHcEyWcCiolEdoUSP+4DD7xRX8zBe4qVCtjDKtiCL+94mkgSWpiy6tmDmogyC1mzGvnkCjgCaypUW2pTvjuzbhuzfMvD2viBzWwjfYqBW2rU360R+3jRnz2jPg1ETmvzTPsCvZsDn8yhrvuR31ySL+7ETsxC68lCK2jyDhujrFmhq5sVPYrBzerS3zwh+9kBj3yBxWORf+5jL91CF/XB3swizdtTjrrRTitTD1yCO5sFfjujbnvS9KOi3DkBTovC/WqDKLcVr8yyP5yhzEiB+NYxj+81CMWx3q4VfjoxZ+Sg1XNRL7wRK2sF7itzGibhXFjRDQpDbl3VzcsDO/hBDyqQ7cnRXkqyLyuxr+6DuyeRPYoCXKgA/ZlRjbggq1r2XOoTBcOiBfPCMNBQTWz2TwrBnKmCXCvWr+60XFli5ySiTPiQouEQYlDgd8QAvl4XvHixe3s2y+kCn7zit+VhF1WheZgDnbuCGffSXYlBHDvnCsfRhzYRfGtURxWQrz1y6EYAjVwkbX03fw3kLRylf+93HEvWjp5X65smrAt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vu/E9P6+vv6jFxfdvnn3ztLrMe4o9vBwquscMVigNIV1gs+SpRMnToy76o3uIUFODS3Jtev2n75w7f6te5e8DLElQm4+cRl9u4CQKH9XEzxplYmRgToAADVmlE2t74hfAAAAAElFTkSuQmCC

Screenshots:
Chrome:
image

Firefox:
image

Note: Dynamically loads favicon is not supported by Safari yet.

@ciiay ciiay requested a review from a team as a code owner July 9, 2024 15:38
Copy link
Contributor

github-actions bot commented Jul 9, 2024

The image is available at: quay.io/janus-idp/backstage-showcase:pr-1381!

@ciiay
Copy link
Contributor Author

ciiay commented Jul 9, 2024

/retest

@ciiay ciiay force-pushed the rhidp-2763-update-config-at-runtime branch from 64cea4d to fd34a50 Compare July 11, 2024 22:23
Copy link
Contributor

The image is available at: quay.io/janus-idp/backstage-showcase:pr-1381!

@ciiay
Copy link
Contributor Author

ciiay commented Jul 12, 2024

/test e2e-tests

@ciiay
Copy link
Contributor Author

ciiay commented Jul 12, 2024

/retest

Signed-off-by: Yi Cai <yicai@redhat.com>
@ciiay ciiay force-pushed the rhidp-2763-update-config-at-runtime branch from fd34a50 to efb21e4 Compare July 12, 2024 19:36
Copy link
Contributor

The image is available at: quay.io/janus-idp/backstage-showcase:pr-1381!

Copy link
Member

@gashcrumb gashcrumb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Copy link

openshift-ci bot commented Jul 15, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: gashcrumb

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-merge-bot openshift-merge-bot bot merged commit 222555a into janus-idp:main Jul 15, 2024
7 checks passed
@divyanshiGupta
Copy link
Member

/cherry-pick 1.2.x

@openshift-cherrypick-robot

@divyanshiGupta: new pull request created: #1424

In response to this:

/cherry-pick 1.2.x

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants